import onlyNumber from './onlyNumber'
const install = Vue => {
  Vue.directive('number', onlyNumber)
  Vue.directive('number-normal', onlyNumber)
}
/*
  调用示例
  最大两位小数
  <input
    v-only-number="{ min: 0, max: 100, precision: 2 }"
    v-model.number="price"
  />
  只允许输入整数
  <input
    v-only-number="{ min: -10, max: 100, precision: 0 }"
    v-model.number="price"
  />
*/

export default {
  install
}
